package cn.paging.dao;

import java.util.List;

public interface MemberDao
{

	/**
	 * query for paging
	 * @param hql (string expression)
	 * @return records
	 */
	public List queryForPage(final String hql,final int offset,final int length);
	
	/**
	 * query all records
	 * @param hql (string expression)
	 * @return total records
	 */
	public int getAllRowCount(String hql);
	
	/**
	 * update record
	 * @param o (object that mapping your class's name in model) 
	 * 
	 */
	public void update(Object o);
	
	/**
	 * add record
	 * @param o
	 */
	public void add(Object o);
	
	/**
	 * delete record
	 * 
	 * @param id (delete record by id)
	 */
	public void delete(int id);
	
	/**
	 * edit record for update
	 * @param id (edit it by id)
	 * @return object
	 */
	public Object edit(int id);

}